<?
class Connect{
	var $conn;
	public function Connect($host,$usernm,$passwd,$dbname,$charset){
		$this->conn	= mysql_connect($host,$usernm,$passwd)or die(" $host,$usernm,$password,$dbname,$charset ไม่สามารถติดต่อฐานข้อมูลได้".mysql_error());
		mysql_query($charset);
		mysql_select_db($dbname);
	}
	
	public function getConn(){
		return $this->conn;
	}
	
	public function close(){
		mysql_close($this->conn);
	}
}
?>